﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Customer_View.aspx.cs" Inherits="masterdata_Customer_View"
    MasterPageFile="~/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>客户信息</title>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2&services=true"></script>
    <style type="text/css">
        .tablefield
        {
            text-align: right;
            font-size: 9pt;
            font-weight: bolder;
            color: #5C5E6A;
        }
        .tableTD td
        {
            font-size: 9pt;
            background-color: White;
            height: 40px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

        <table id="wsd_inputtable" width="100%">
            <tr>
                <td class="tabletitle" colspan="5">
                    <b>门店查询</b>
                </td>
            </tr>
  
        <tr id="trCustomerID" runat="server" visible="false">
                    <td class="tablefield" style="width: 80px;">
                        编号:
                    </td>
                    <td id="txtCustomerID" runat="server" >
                        &nbsp;
                    </td>
                    <td class="tablefield" style="width: 60px;">
                        <asp:Literal ID="Literal6" runat="server" Text="<%$resources:language,lbl_CustomerName %>"></asp:Literal>:
                    </td>
                    <td nowrap="nowrap">
                      
                        <asp:TextBox runat="server" ID="txtName" class="default" MaxLength="20"></asp:TextBox>
                      
                    </td>
                    <td class="tablefield" rowspan="8" >
                <div style="width: 350px; height: 350px; border: 1px solid gray" id="container">
                </div>
                 <input id="txtHidOrg" type="hidden" runat="server" />
                <input id="txtHidUser" type="hidden" runat="server" />
            </td>
                </tr>
                <tr>
                    <td class="tablefield">
                        <asp:Literal ID="Literal7" runat="server" Text="<%$resources:language,lbl_Address %>"></asp:Literal>:
                    </td>
                    <td style="width: 150px;">
                        <asp:TextBox runat="server" ID="txtAddress" MaxLength="40" Width="150" class="default"
                            ReadOnly="true"></asp:TextBox>
                    </td>
                    <td class="tablefield">
                        <asp:Literal ID="Literal13" runat="server" Text="<%$resources:language,lbl_ZipCode %>"></asp:Literal>:
                    </td>
                    <td nowrap="nowrap">
                        <asp:TextBox runat="server" class="default" ID="txtZipCode" MaxLength="6" ReadOnly="true"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                       联系电话:
                    </td>
                    <td nowrap="nowrap">
                        <asp:TextBox runat="server" class="default" ID="txtPhone" ReadOnly="true"></asp:TextBox>
                    </td>
                    <td class="tablefield">
                        联系人:</td>
                    <td nowrap="nowrap">
                        <asp:TextBox runat="server" class="default" Width="150" ID="txtContact" ReadOnly="true"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                       部门:</td>
                    <td nowrap="nowrap">
                        <asp:TextBox ID="txtOrg" class="default" runat="server" CausesValidation="false"
                            ReadOnly="true"></asp:TextBox>
                    </td>
                    <td class="tablefield">
                        <asp:Literal ID="Literal20" runat="server" Text="<%$resources:language,lbl_SalesChannel %>"></asp:Literal>:
                    </td>
                    <td nowrap="nowrap">
                        <asp:DropDownList runat="server" ID="ddlChannel" Width="150" ReadOnly="true" Enabled="False">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                        经度:</td>
                    <td nowrap="nowrap">
                        <asp:TextBox runat="server" class="default" ID="txtLongitude" ReadOnly="true"></asp:TextBox>
                    </td>
                    <td class="tablefield">
                        纬度:</td>
                    <td nowrap="nowrap">
                        <asp:TextBox runat="server" ID="txtlatitude" MaxLength="15" class="default" ReadOnly="true"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                       客户等级:</td>
                    <td nowrap="nowrap">
                        <asp:DropDownList ID="ddlStore_Level" Width="150" runat="server" ReadOnly="true">
                        </asp:DropDownList>
                    </td>
                    <td class="tablefield">
                        客户类型:</td>
                    <td nowrap="nowrap">
                <asp:DropDownList runat="server" ID="drpCustomerType" Width="150">
                </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                        指标组: 
                    </td>
                    <td nowrap="nowrap">
                        <asp:DropDownList ID="ddlMeasures" runat="server" Width="150" ReadOnly="true">
                        </asp:DropDownList>
                    </td>
                    <td nowrap="nowrap" class="tablefield">
                       业务代表:</td>
                    <td nowrap="nowrap">
                        <input readonly="true" runat="server" class="default" id="txtMobileUser" width="150" /></td>
                </tr>
                <tr>
                    <td class="tablefield">
                       省份/城市/区县:
                    </td>
                    <td nowrap="nowrap" colspan="3">
                        <asp:TextBox runat="server" class="default" Width="100" ReadOnly="true" ID="txtProvince"></asp:TextBox>
                        <asp:TextBox runat="server" class="default" Width="110" ReadOnly="true" ID="txtViewCity"></asp:TextBox>
                        <asp:TextBox runat="server" class="default" Width="110" ReadOnly="true" ID="txtArea"></asp:TextBox>
                        <span class="tablefield" >
                            <asp:Literal ID="Literal26" runat="server" Text="<%$resources:language,lbl_Active %>"></asp:Literal>:
                            <asp:CheckBox runat="server" ID="chxValid" Checked="true" ReadOnly="true" /></span>
                    </td>
                </tr>
            </table>
       
       
 
    <table id="wsd_inputtable" width="100%">
        <tr>
            <td class="tabletitle">
                <asp:Literal ID="Literal40" runat="server" Text="<%$resources:language,lbl_Operation_Area %>"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="buttonarea">
                <asp:Button ID="btnCancel" runat="server" class="wsd_button2" Text="<%$resources:language,btn_Cancel %>"
                    CausesValidation="false" OnClick="btnCancel_Click" />
            </td>
        </tr>
    </table>
   <script type="text/javascript">
       var txtLongitude = $get("<%=txtLongitude.ClientID %>");
       var txtlatitude = $get("<%=txtlatitude.ClientID %>");
       var lng;
       var lat;
       lng = txtLongitude.value;
       lat = txtlatitude.value;

       if (lng == 0 && lat == 0) {
           //上海人民广场坐标
           lng = 121.48019;
           lat = 31.239428;
       }
       var map = new BMap.Map("container");
       var point = new BMap.Point(lng, lat);
       map.centerAndZoom(point, 11); //初始化地图显示坐标，参数1坐标，参数2缩放级别
       map.addControl(new BMap.NavigationControl()); //添加地图鱼骨控制
       map.enableScrollWheelZoom();
       var marker = new BMap.Marker(point);  // 创建标注
       map.addOverlay(marker);              // 将标注添加到地图中
   
    </script>
</asp:Content>
